function dobuleNumber(strNumber = "") {
	let num = strNumber.toString();
	if (!/\./.test(num)) {
		num += '.00'
	}
	var arrayNum = num.split('.')
	if (arrayNum[1].length < 2) {
		num += '0'
	}
	return num
}
function _twoNumber(strnumber = ''){
	let num = strnumber.toString();
	let res = "";
	if(num[1]){
		res += num
	}else if(num[0]){
		res+= "0"+num[0]
	}else{
		res+= "00"
	}
	return res
}

function datetime(timestamp){
	let date = new Date(timestamp)
	let ymd = `${date.getFullYear()}-${_twoNumber(date.getMonth()+1)}-${_twoNumber(date.getDate())}`
	let hms = `${_twoNumber(date.getHours())}:${_twoNumber(date.getMinutes())}:${_twoNumber(date.getSeconds())}`
	return ymd+" "+hms
}

export default {
	dobuleNumber,
	datetime
}
